package com.bw.demo.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding

abstract class BaseActivity<VDB : ViewDataBinding> : AppCompatActivity(){
    protected lateinit var mDataBinding : VDB
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mDataBinding=DataBindingUtil.setContentView(this,getLyoutId())
        initView()
        initData()
    }

    abstract fun initData()

    abstract fun initView()

    abstract fun getLyoutId(): Int
}